import React, { Component } from 'react'
import './index.scss'

export default class Desc extends Component {
  static defaultProps = {
    productDesc: []
  }

  render() {
    const { productDesc } = this.props
    return (
      <div className='desc'>
        {
          productDesc.map((item, index) => {
            return <div key={index} className='desc__cont'>
              {item.type === 'fmdesc-module-product-pic' &&
                item.data.images.map((itemName, indexImg) => {
                  return <img src={itemName} key={indexImg} alt='' />
                })
              }
            </div>
          })
        }
      </div>
    )
  }
}